load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

package(default_visibility = ["//:__subpackages__"])

licenses(["notice"])  # keep

go_library(
    name = "gcpkms",
    srcs = [
        "gcp_kms_aead.go",
        "gcp_kms_client.go",
    ],
    importpath = "github.com/google/tink/go/integration/gcpkms",
    visibility = ["//visibility:public"],
    deps = [
        "//core/registry",
        "//tink",
        "@org_golang_google_api//cloudkms/v1:cloudkms",
        "@org_golang_google_api//option",
    ],
)

go_test(
    name = "gcpkms_test",
    srcs = [
        "gcp_kms_aead_test.go",
        "gcp_kms_client_test.go",
        "gcp_kms_integration_test.go",
    ],
    data = [
        # Google Cloud KMS credentials to be used.
        "//testdata/gcp:credentials",
        "@google_root_pem//file",  #keep
    ],
    embed = [":gcpkms"],
    tags = ["manual"],
    deps = [
        "//aead",
        "@org_golang_google_api//cloudkms/v1:cloudkms",
        "@org_golang_google_api//option",
    ],
)

alias(
    name = "go_default_library",
    actual = ":gcpkms",
    visibility = ["//visibility:public"],
)
